// KetonalSettingsWindow.cpp: implementation of the KetonalSettingsWindow class.
//
//////////////////////////////////////////////////////////////////////

#include "Ketonal.h"
#include "KetonalSettingsWindow.h"

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

KetonalSettingsWindow::KetonalSettingsWindow(Ketonal *_p) : Component (T("Ketonal Settings"))
{
	parent = _p;
	setVisible (true);
	setAlwaysOnTop (true);
	addToDesktop (ComponentPeer::windowIsTemporary);
	setBounds (parent->getScreenX()+parent->getWidth(), parent->getScreenY(), 256, 128);
	addAndMakeVisible (settingsComponent = new KetonalSettingsComponent(parent));
}

KetonalSettingsWindow::~KetonalSettingsWindow()
{
	deleteAndZero (settingsComponent);
}

void KetonalSettingsWindow::paint (Graphics &g)
{
	g.fillAll (Colours::white.withAlpha(0.0f));
}

void KetonalSettingsWindow::close(void)
{
	parent->closeOptions();

	delete this;
}
